<?php
/* @var $this BeritaController */
/* @var $model Berita */
/* @var $form CActiveForm */
$request = Yii::app()->request;
if ($request->enableCsrfValidation) {
    echo CHtml::metaTag($request->getCsrfToken(), 'csrf-token');
    echo CHtml::metaTag($request->csrfTokenName, 'csrf-param');
}
?>

<div class="form">
    <?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'cni-berita-form',
    'enableAjaxValidation' => false,)); ?>

    <?php echo $form->errorSummary($model); ?>

    <table border="0" cellpadding="0" cellspacing="0" id="id-form">
       <!-- <tr>
            <th valign="top"><?php echo $model->getAttributeLabel('parent_id'); ?></th>
            <td class="idform">
                <?php echo $form->dropDownList($model, 'parent_id', $list_parent, array(
                'empty' => '(Pilih Kategori)',
                'style' => 'width:200px',
                'class' => 'styledselect_form_1')); ?>
            </td>
            <td class="idform">
                <?php if ($model->hasErrors('parent_id')) echo "<div class='error-left'></div>"; ?>
                <?php echo $form->error($model, 'parent_id', array('class' => 'error-inner')); ?>
            </td>
        </tr>-->
        <tr>
            <th valign="top"><?php echo $model->getAttributeLabel('nama'); ?></th>
            <td class="idform">
                <?php echo $form->textField($model, 'nama',
                array('size' => 60, 'maxlength' => 250)); ?>
            </td>
            <td class="idform">
                <?php if ($model->hasErrors('nama')) echo "<div class='error-left'></div>"; ?>
                <?php echo $form->error($model, 'nama', array('class' => 'error-inner')); ?>
            </td>
        </tr>
       <!-- <tr>
            <th valign="top"><?php echo $model->getAttributeLabel('name_'); ?></th>
            <td class="idform">
                <?php echo $form->textField($model, 'name_',
                array('size' => 60, 'maxlength' => 250, 'class' => 'inp-form')); ?>
            </td>
            <td class="idform">
                <?php if ($model->hasErrors('name_')) echo "<div class='error-left'></div>"; ?>
                <?php echo $form->error($model, 'name_', array('class' => 'error-inner')); ?>
            </td>
        </tr>-->
        <tr>
            <th valign="top"><?php echo $model->getAttributeLabel('isi'); ?></th>
            <td class="idform">
                <?php $this->widget('ext.tinymce.TinyMce', array(
                    'model' => $model,
                    'attribute' => 'isi',
                    'fileManager' => array(
                    'class' => 'ext.elFinder.TinyMceElFinder',
                    'connectorRoute' => 'elfinder/connector',),
                    'htmlOptions' => array('rows' => 6, 'cols' => 60,),)); ?>
            </td>
            <td class="idform">
                <?php if ($model->hasErrors('isi')) echo "<div class='error-left'></div>"; ?>
                <?php echo $form->error($model, 'isi', array('class' => 'error-inner')); ?>
            </td>
        </tr>
        <!--<tr>
            <th valign="top"><?php echo $model->getAttributeLabel('content'); ?></th>
            <td class="idform">
                <?php $this->widget('ext.tinymce.TinyMce', array(
                    'model' => $model,
                    'attribute' => 'content',
                    'fileManager' => array(
                        'class' => 'ext.elFinder.TinyMceElFinder',
                        'connectorRoute' => 'elfinder/connector',),
                    'htmlOptions' => array('rows' => 6, 'cols' => 60,),)); ?>
            </td>
            <td class="idform">
                <?php if ($model->hasErrors('content')) echo "<div class='error-left'></div>"; ?>
                <?php echo $form->error($model, 'content', array('class' => 'error-inner')); ?>
            </td>
        </tr>-->
        <tr>
            <th>&nbsp;</th>
            <td valign="top">
              <?php echo CHtml::submitButton($model->isNewRecord ? 'Buat' : 'Simpan',array('class'=>'form-submit')); ?>
            </td>
            <td class="idform"></td>
        </tr>
    </table>

    <?php $this->endWidget(); ?>
</div><!-- form -->